import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		user: {
			userName: "",
			password: ""
		},
		homeBanner: [],
	},
	mutations: {
		// 社区获取轮播图
		getHomeBanner(state) {
			uni.request({
				url: "http://123.57.67.148:3000/mock/591/home/banner",
				method: "POST",
				data: {},
				success: (res) => {
					state.homeBanner = [...res.data.data.navbars];
					// console.log(state.homeBanner)
				}
			});
		}
	},
	actions: {}
})
export default store